package org.xenon.vote.model.pojo.po;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 记录已自动登录的用户
 * 另外也记录密码重置口令
 */

public class Login {
    /**
     * Cookie中的识别码
     */
    @NotNull(message = "hash.null")
    @NotBlank(message = "hash.blank")
    String token;

    /**
     * 用户邮箱
     */
    @NotNull(message = "mail.null")
    String mail;

    public Login(@NotNull(message = "hash.null")
                 @NotBlank(message = "hash.blank") String token,
                 @NotNull(message = "mail.null") String mail) {
        this.token = token;
        this.mail = mail;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public String getMail() {
        return mail;
    }

    public void setMail(String mail) {
        this.mail = mail;
    }
}
